package com.demo.springMvcDemo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.demo.springMvcDemo.dao.IEmployeeDAO;
import com.demo.springMvcDemo.model.Employee;
import com.demo.springMvcDemo.service.IEmployeeService;

@Service
public class EmployeeServiceImpl implements IEmployeeService {
	// @Resource
	@Autowired
	private IEmployeeDAO dao;
	// private IEmployeeDAO dao = new EmployeeDAOImpl();

	@Override
	public List<Employee> queryList() {
		return dao.queryList();
	}

	@Override
	public void deleteObject(Integer id) {

		dao.deleteObject(id);

	}

	@Override
	public void insertObject(Employee employee) {

		dao.insertObject(employee);

	}

	@Override
	public Employee queryObject(Integer id) {
		return dao.queryObject(id);
	}

	@Override
	public void updateObject(Employee employee) {

		dao.updateObject(employee);
	}
}
